
#ifndef SLIDERRESTRAINTWIDGET_H
#define SLIDERRESTRAINTWIDGET_H

#include <BButton>
#include <BComboBox>
#include <BRealSpinBox>
#include <BDoubleSlider>
#include <BCheckBox>
#include <BLineEdit>
#include <BSliderRestraint>

using namespace BWE;

class SliderRestraintPanel : public BWidget
{
	BOBJECT(SliderRestraintPanel);
public:
	SliderRestraintPanel(BWidget* parent = 0);
	~SliderRestraintPanel();

protected:
	void slotAssetChanged(BObject* object, const BValue& value);
	void slotLinearMotorReached(BObject* object, const BValue& value);
	void slotAngularMotorReached(BObject* object, const BValue& value);

	void slotLinearLimitEditFinished(BObject* object, const BValue& value);
	void slotAngularLimitEditFinished(BObject* object, const BValue& value);

	void slotLinearMotorEnabledToggled(BObject* object, const BValue& value);
	void slotLinearMotorTargetEditFinished(BObject* object, const BValue& value);
	void slotLinearMotorVelocityEditFinished(BObject* object, const BValue& value);
	void slotLinearMotorMaxImpulseEditFinished(BObject* object, const BValue& value);
	void slotLinearMotorTargetSliding(BObject* object, const BValue& value);

	void slotAngularMotorEnabledToggled(BObject* object, const BValue& value);
	void slotAngularMotorTargetEditFinished(BObject* object, const BValue& value);
	void slotAngularMotorVelocityEditFinished(BObject* object, const BValue& value);
	void slotAngularMotorMaxImpulseEditFinished(BObject* object, const BValue& value);
	void slotAngularMotorTargetSliding(BObject* object, const BValue& value);

private:
	virtual void updateEvent(const BEvent& event);

private:
	BSliderRestraint*		_sliderRestraint;

	BRealSpinBox*			_linearMinSpinBox;
	BRealSpinBox*			_linearMaxSpinBox;
	BRealSpinBox*			_linearValueSpinBox;

	BRealSpinBox*			_angularMinSpinBox;
	BRealSpinBox*			_angularMaxSpinBox;
	BRealSpinBox*			_angularValueSpinBox;

	BGroupBox*				_linearMotorGroupBox;
	BRealSpinBox*			_linearMotorTargetSpinBox;
	BRealSpinBox*			_linearMotorVelocitySpinBox;
	BRealSpinBox*			_linearMotorMaxImpulseSpinBox;
	BCheckBox*				_linearMotorReachedCheckBox;
	BDoubleSlider*			_linearMotorTargetSlider;

	BGroupBox*				_angularMotorGroupBox;
	BRealSpinBox*			_angularMotorTargetSpinBox;
	BRealSpinBox*			_angularMotorVelocitySpinBox;
	BRealSpinBox*			_angularMotorMaxImpulseSpinBox;
	BCheckBox*				_angularMotorReachedCheckBox;
	BDoubleSlider*			_angularMotorTargetSlider;

};

#endif
